package com.caiyouxi.finance.controller;

import com.caiyouxi.common.bean.ResData;
import com.caiyouxi.finance.model.CouponType;
import com.caiyouxi.finance.service.CouponTypeServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("coupon_type")
public class CouponTypeController {
    @Autowired
    private CouponTypeServices services;
    //查询单条
    @RequestMapping("select_coupon_type")
    public ResData select_coupon_type(@RequestBody CouponType bean){
        return services.select_coupon_type(bean);
    }
    //删除
    @RequestMapping("delete_coupon_type")
    public ResData delete_coupon_type(@RequestBody CouponType bean){
        return services.delete_coupon_type(bean);
    }
    //修改
    @RequestMapping("update_coupon_type")
    public ResData update_coupon_type(@RequestBody CouponType bean){
        return services.update_coupon_type(bean);
    }
    //查询所有
    @RequestMapping("coupon_type_list")
    public ResData coupon_type_list(@RequestBody CouponType bean){
        return services.coupon_type_list(bean);
    }
    //新增
    @RequestMapping("add_coupon_type")
    public ResData add_coupon_type(@RequestBody CouponType bean){
        return services.add_coupon_type(bean);
    }
}
